Repository navigation
Model:Cycles base 7b0c96d9: the machine table and machine switches - #2479
durchgemacht wants to merge 8 commits into
Conversation
The base owns mw_machines (events.json index 6): eight machine slots, 6 to 13, after the six stock machines. A machine module contributes one struct mw_machine (include/mc/machine.h) from its runtime package and claims its slot as machine:<slot>. A slot whose module is gone reads "----" and stays silent, and plays again once the module is back; without a machine module every stock flow is as it was. mw_machine_switches (index 7) lets a machine take PUNCH and GATE as switches: MACHINES held + PUNCH or GATE on a track that plays it flips the switch instead of the stock parameter, the LEDs show the switches while MACHINES is held, and the list opens on the release if no switch was flipped. The switches live in k 32 and are saved with the sound. The record reserves four params for a machine's own parameters (k 23-26 in a later base), so there is one record format; the base does not read them yet. include/mc/sound.h names the words the base adds to a sound and k 32's fields, kept apart by _Static_assert; 0 is "as stock" everywhere. Release base 23a7a53a (94 .boot, 46512 .run, 125060 .bss, 126 sites), flashed on a unit: SINE on trial plays, its switch, saved and loaded, removal and return as recorded in docs/verification. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…achine-table-core
…ase/model-cycles-machine-table-core
With main and base/model-cycles-next merged (a runtime module never patches over the base's own sites), the release base is 7b0c96d9: 94 .boot, 47540 .run, 125060 .bss, 126 sites. Flashed on a unit: set CRC 0xad8b9c8d, SINE kept and played with its switch from a saved project. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…achine-table-core
repeat98#2394) into base/model-cycles-machine-table-core The Model:Cycles sources are unchanged by the merge: the base still builds as 7b0c96d9 (94 bytes .boot, 47,540 .run, 125,060 .bss, 126 sites), matching base-binding.json. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Thanks, this reads well and the record is thorough.
Where it stands: I read the machine table and the switches (machines.c, switches.c, machine.h, sound.h) and found nothing to change. An empty slot stays silent and reads "----", stock flows are untouched without a machine module, and the switches only take PUNCH and GATE while MACHINES is held on a track whose machine asks for them. Your unit record covers both release builds, and the untested cases (recovery over MIDI IN, a power cycle with a kept module, GATE and two machine modules) are named as such.
Next step: when you're done with it, mark it ready (gh pr ready 2479). Pull requests into base/model-cycles-next only run the description check, so nothing else needs to go green. As base work, it then waits for the owner's approval before it merges into the cumulative branch.
The octatrack-base.test.ts path-with-a-space finding you mention would be welcome as its own small Fix: pull request against main.
The machine table and machine switches for the Model:Cycles base, on Modwerk's own core (#2394) and the held sites of
base/model-cycles-next, with the record format agreed with the owner on 30 November 2026.mw_machines(events.json index 6) gives machine modules eight slots, 6 to 13, after the six stock machines: a module contributes one record from its runtime package (name, picture, its four knobs' names and defaults, Amp Decay's default,updateandrender), and its machine shows up after CHORD, plays on its tracks, and reads "----" and stays silent when the module is taken out; the sound keeps its machine and plays again once the module is back.mw_machine_switches(index 7) lets a machine take PUNCH and GATE as switches: MACHINES held + PUNCH or GATE on a track that plays it flips the machine's switch instead of the stock parameter, the LEDs show the switches while MACHINES is held, and the list opens on the release if no switch was flipped. The switches live in k 32 and are saved with the sound. As agreed, the record already reserves fourparamsfor a machine's own parameters (k 23 to 26 in the next step), so there is one record format; the base does not read them yet.include/mc/sound.hnames the words the base adds to a sound and k 32's fields (Track FX 0-7, PUNCH 8, GATE 9, the Track FX values' destinations 10-15), with_Static_asserts that keep them apart and every bit owned; 0 is "as stock" everywhere. Release base7b0c96d9: 94 bytes.boot, 47,540.run, 125,060.bss, 126 sites. This also bringsbase/model-cycles-next's binding up to date: it still namesdda53ffd, while that branch builds as550da07asince the held-sites commits; with this change the branch builds as7b0c96d9, which the binding now records.base/model-cycles-next. The record'sparamsare not read yet; that is the next pull request.23a7a53a(before the merge ofbase/model-cycles-next) through the whole list below, then7b0c96d9(after it; the same identity again after Improvement: Modwerk's own core for the Model:Cycles base #2394 reachedbase/model-cycles-next) for the identity, a kept trial and a saved project with a switch on. Recovery over MIDI IN after the base is not tested: neither of us has a MIDI interface (owner, 30 November 2026).Tested on a unit: release base 7b0c96d9, image b21e259f flashed with Transfer: ident set CRC 0xad8b9c8d, 47604 bytes; sine.mwrm refused at keep while playing, kept when stopped; a project saved with a switch on plays SINE on C4 for 30 s and more. Release base 23a7a53a, image 3c01d911 flashed: ident 0x7946f5e6, 46576 bytes; SINE on trial after CHORD with TONE's picture, a tone on C5; MACHINES + PUNCH flips its switch (C4) and lights PUNCH, the list opens on the second release only; the switch saved and loaded with the project; PUNCH alone toggles stock PUNCH on SINE and KICK; MACHINES on KICK opens on the press; a held trig shows NOTE, VEL and LEN on SINE and TONE; removed while playing refused, removed when stopped silent and "----", tried again plays on C4 without choosing it again.
Edge cases
7b0c96d9and23a7a53aflashed with Transfer,mc_link.py ident0xad8b9c8d/ 47,604 and0x7946f5e6/ 46,576 bytes, armed 0updateandrendertry sine.mwrm --keep, track 1 on SINE, PITCH 64, DECAY 60, one trig on step 1remove sinewith PLAY onunsafe (playing?)remove sine --keep, PLAY; stopped,try sine.mwrm --keep, PLAY7b0c96d9unsafe (playing?)runtime.cchanged under the table7b0c96d9flashed, a kept trial, the saved project.syxover MIDI INGuides: the Model:Cycles README and the machines guide did not say what a machine record must carry for parameters to come, or which bits of k 32 are taken; both say it now, and
include/mc/sound.hholds the layout. One finding outside this change, not fixed here:octatrack-base.test.tsbuilds its folder withnew URL(…).pathname, so it fails in a checkout whose path has a space (%20); it belongs in its ownFix:pull request. Locallypr:ready -- --base-branch base/model-cycles-nextpassed everything else (zoom-linkandmachine-slotstimed out under load and pass alone).🤖 Generated with Claude Code